package com.lanyou.cook.entity.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.lanyou.cook.common.DefaultDateJsonSerializer;

@Entity
@EntityListeners({ AuditingEntityListener.class})
@Table(name = "T_COOK_BU_JOB_STATS")
public class InterfaceCount{
	
	private String id;
	private int failedTimes;
	private int successTimes;
	private String interfaceName;
	private String fieldName;
	private String systemName;
	private long jobId;
	private String fieldSystemId;
	private String creator;
	private String modifier;
	private Date createTime;
	private Date modifyTime;
	//2016年6月22日14:51:01 by-zengzugen
	private int recordQTY;
	
	@Column(name="OUTPUT_QTY")
	public int getRecordQTY() {
		return recordQTY;
	}
	public void setRecordQTY(int recordQTY) {
		this.recordQTY = recordQTY;
	}
	@Column(name="FIELD_SYSTEM_ID")
	public String getFieldSystemId() {
		return fieldSystemId;
	}
	public void setFieldSystemId(String fieldSystemId) {
		this.fieldSystemId = fieldSystemId;
	}
	@Column(name="INTERFACE_NAME",length=50)
	public String getInterfaceName() {
		return interfaceName;
	}
	public void setInterfaceName(String interfaceName) {
		this.interfaceName = interfaceName;
	}
	
	@Column(name="FIELD_NAME")
	public String getFieldName() {
		return fieldName;
	}
	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}
	
	@Column(name="SYSTEM_NAME")
	public String getSystemName() {
		return systemName;
	}
	public void setSystemName(String systemName) {
		this.systemName = systemName;
	}
	
	@Column(name = "R_JOB_ID")
	public long getJobId() {
		return jobId;
	}
	public void setJobId(long jobId) {
		this.jobId = jobId;
	}
	
	
	
	@Id
	@GeneratedValue(generator = "uuidGenerator")
	@GenericGenerator(name = "uuidGenerator", strategy = "uuid")
	@Column(name = "JOB_COUNT_ID", length = 36)
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	@Column(name="FAIL_QTY")
	public int getFailedTimes() {
		return failedTimes;
	}
	public void setFailedTimes(int failedTimes) {
		this.failedTimes = failedTimes;
	}
	@Column(name="SUCCESS_QTY")
	public int getSuccessTimes() {
		return successTimes;
	}
	public void setSuccessTimes(int successTimes) {
		this.successTimes = successTimes;
	}
	@CreatedBy
	@Column(length = 50, updatable=false)
	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	@LastModifiedBy
	@Column(length = 50)
	public String getModifier() {
		return modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	@Column(name = "CREATED_DATE", updatable=false)
	@JsonSerialize(using = DefaultDateJsonSerializer.class)
	@CreatedDate
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "LAST_UPDATED_DATE")
	@JsonSerialize(using = DefaultDateJsonSerializer.class)
	@LastModifiedDate
	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}
	
}